﻿using System;

class LocalFunctions
{
  public Factorial(n : int) : void
  {
    def fact(n,acc) {
      if (n > 0)
        fact(n-1,n*acc)
      else
        acc
    }
    
    Console.WriteLine(fact(n,1));
  }
}

// local function aka named lambda
// supports (tail) recursive